# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

import pymysql

def connection():
  db = pymysql.connect(user= "lark", password= "0915", host="localhost", database="test")
  cursor = db.cursor()
  cursor.execute("SELECT VERSION()")
  data = cursor.fetchone()
  print("Database version: %s" % data)
  db.close()

# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    connection()